get As Result
inline fun <K, V> Map<K, *>.getAsResult(key: K, type: Class<out V>, message: Map<K, *>.(K) -> String = { MISSING_KEY }): Result<V>(source)
inline fun <K, V> Map<K, *>.getAsResult(key: K, type: KClass<out V & Any>, message: Map<K, *>.(K) -> String = { MISSING_KEY }): Result<V>(source)
Retrieves the value associated with the specified key in the map, casts it to the provided type, and wraps the result in a Result object. If the key is not present or the cast fails, the exception is encapsulated within the Result.
inline fun <K, V> Map<K, *>.getAsResult(key: K, message: Map<K, *>.(K) -> String = { MISSING_KEY }): Result<V>(source)
Retrieves the value associated with the specified key in the map, casts it as V, and wraps the result in a Result object. If the key is not present or the cast fails, the exception is encapsulated within the Result.